package leetcode91_100;

import outoforder.leetcode.TreeNode;

import java.util.ArrayList;
import java.util.List;

/**
 * @author shhjiang_001
 * @create 2020-07-02 22:51
 */

public class Solution94 {
    ArrayList<Integer> list = new ArrayList<>();
    public List<Integer> inorderTraversal(TreeNode root) {
        if (root.left != null) {
            inorderTraversal(root.left);
        }
            list.add(root.val);
        if (root.right != null){
            inorderTraversal(root.right);
        }
        return list;
    }

}
